package generic_test;

/**
 *  子类在实现接口时，继续保留泛型，子类也不清楚具体的类型
 * @param <T>
 */
public class MessageImpl1<T>  implements IMessage<T>{
    private T msg;
    @Override
    public void print(T t) {
        System.out.println(t);
    }

    @Override
    public T getMsg() {
        return msg;
    }

    @Override
    public void setMsg(T t) {
        this.msg = t;
    }
}
